<!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no"/>
    <link rel="stylesheet" href="../../libs/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="../../libs/app.css"/>
    <link rel="stylesheet" href="../../css/main.css"/>
    <link rel="stylesheet" href="../../css/select-bank.css"/>
</head>
<body>
<div class="head">
    <img class="mui-action-back" src="../../images/all-left.png" alt="">
    <p>选择银行</p>
</div>
<div class="context"></div>

<script src="../../js/jquery-3.1.1.min.js"></script>
<script src="../../libs/mui.min.js"></script>
<script src="../../js/url.js"></script>
<script>
//    function href(a, b, c) {
//        mui.openWindow({
//            url: a,
//            id: b,
//            show: "pop-in",
//            extras: {
//                bank: c
//            }
//        })
//    }
    $.ajax({
        type: "get",
        url: ur + "rest/loanController/online-credit-card",
        async: true,
        dataType: 'json',
        success: function (data) {
            if (data.meta.code == 'S002') {
                for (var i = 0; i < data.data.length; i++) {
                    var cardItem = '<div class="item-card" herf="' + data.data[i].link + '"><p><span class="bank">' +
                        data.data[i].bank + '</span></p></div>';
                    $('.context').append(cardItem);
                }
            }
        }
    });
    $('.context').on('tap', 'div', function () {
//        href('askfor-card-native.html', 'askfor-card-native', $(this).find('.bank').text());
        href('askfor-card-native.html', 'askfor-card-native');
        localStorage.setItem('signCard-askforCardNative', $(this).find('.bank').text());
    });
</script>
</body>

</html>